package org.finalministry.gui.components.frames;

import java.awt.Color;
import java.io.IOException;

import javax.swing.JFrame;

import org.finalministry.gui.GuiMain;
import org.finalministry.gui.GuiMainActionListener;
import org.finalministry.gui.components.ImageButton;

public class ExportManagerFrame extends JFrame {

	private static final Color BGCOLOR = new Color(11, 145, 186);
	private static final Color COLOR = new Color(255, 255, 255);

	private static final long serialVersionUID = -2318936558916790055L;
	private GuiMainActionListener guiMainActionListener;

	private GuiMain gui;

	public ExportManagerFrame(GuiMain gui) {
		this.gui = gui;
		this.setLayout(null);
		this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		this.setBackground(BGCOLOR);
		this.setBounds(0, 0, 400, 300);
		this.setTitle("Finalministry Export Manager");
		this.guiMainActionListener = new GuiMainActionListener(gui);

		try {
			ImageButton buttonExportKML = new ImageButton("Export as KML file", 70, 10, 50, 50, "icons/KML2.gif", guiMainActionListener);
			buttonExportKML.setLabelColor(COLOR);
			this.add(buttonExportKML);
			this.add(buttonExportKML.getFLabel());

		} catch (IOException e) {
			e.printStackTrace();
		}

		this.setVisible(true);
	}
}
